﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SensorMonitor
{

    class PROP
    {
        bool bInstDir;
        bool bWithBin;
        bool bWithStr;
        bool bCat;
        
        bool bWithSrc;
        bool bWithDest;

        //
        //bool bFileSys;
        bool bEchoNeeded;
    }

    class KHEAD
    {
        byte ver;
        byte len;
        byte id;
        byte op;

        byte property;
        //PROP property;
        
        byte index;
        byte ifmt;
        byte crc8;
        

        //======================

        KHEAD()
        {
            ver = (byte)'J';
            len = 0;
            id = 0;
            op = 0;
            property = 0;
            index = 0;
            ifmt = 0;
            crc8 = 0;
        }

        public void setBitPP(byte bit_index, bool withBool){
            property |= (byte)(1 << bit_index);
        }

        public void clrBitPP(byte bit_index, bool withBool)
        {
            byte b = (byte)(1 << bit_index);
            property &= (byte)(~b);
        }
    

    }

    

}
